<?php $this->load->view('header'); ?>
<?php $this->load->view('menus'); ?>

<h2><?=$this->task->title?></h2>

<b>Start date:</b> <?=$this->task->start_date?><br />
<b>End date:</b> <?=$this->task->end_date?><br />
<b>Project:</b> <?=$this->Projects->fetch($this->task->project_id)->title?><br />
<b>Assigned:</b> <br />

<br />
<h3>Comments</h3>

<? foreach($this->TaskComments->fetch_by_task($this->task->task_id) as $comment) { ?>
	<?=$comment->text?>
	<hr />
<? } ?>

<form action="<?=site_url('task/attach/comment/'.$this->task->task_id)?>" method="post">
	<textarea name="comment" style="height: 50px;"></textarea>
	<button type="submit" name="submit">Send</button>
</form>

<?php $this->load->view('footer'); ?>
